<table class="table table-bordered">
    <!-- 一、基础信息 -->
    <tr>
        <th colspan="2">一、基础信息</th>
    </tr>
    <tr>
        <td width="50%">用户姓名：<span class="hengxian">{{ $model->user->name }}</span></td>
        <td>填表日期：<span class="hengxian">{{ $model->write_date }}</span>
        复查时间：<span class="hengxian">{{ $model->fu_check_date }}</span></td>
    </tr>

    <!-- 二、生活习惯评估 -->
    <tr>
        <th colspan="2">二、生活习惯评估</th>
    </tr>
    <tr>
        <td colspan="2">
            <strong>1. 睡眠习惯</strong><br>
            上学期间：入睡 ⏰ [<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->shenghuo, 'shangxue', '') }}</span>] | 起床 ⏰ [<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->shenghuo, 'shangxue1', '') }}</span>]<br>
            放假期间：入睡 ⏰ [<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->shenghuo, 'fangjia', '') }}</span>] | 起床 ⏰ [<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->shenghuo, 'fangjia1', '') }}</span>]<br>
            熬夜频率：{!! \Dcat\Admin\Widgets\Checkbox::make('aoye', \App\Admin\Repositories\Config::selectOptions(pid: 483)->all())->inline()->check(\Illuminate\Support\Arr::get($model->shenghuo, 'aoye', [])) !!}
            @if(in_array(\Illuminate\Support\Arr::get($model->shenghuo, 'aoye', []), [485]))
            <label>偶尔（近3月<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->shenghuo, 'aoye1', '') }}次）</label>
            @elseif(in_array(\Illuminate\Support\Arr::get($model->shenghuo, 'aoye', []), [486]))
            <label>经常（最晚⏰[<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->shenghuo, 'aoye2', '') }}]入睡）</label>
            @endif
          </td>
    </tr>
    <tr>
        <td colspan="2">
            <strong>2. 户外活动（可多选）</strong><br>
            时段：
            <label>上午 [<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->shenghuo, 'shangwu', '') }}</span>至<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->shenghuo, 'shangwu1', '') }}</span>]</label>
            <label>下午 [<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->shenghuo, 'xiawu', '') }}</span>至<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->shenghuo, 'xiawu1', '') }}</span>]</label><br>
            陪同者：
            {!! \Dcat\Admin\Widgets\Checkbox::make('peitongzhe', \App\Admin\Repositories\Config::selectOptions(pid: 487)->all())->inline()->check(\Illuminate\Support\Arr::get($model->shenghuo, 'peitong', [])) !!}
            <br>
            活动内容：<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->shenghuo, 'huodongnei', '') }}</span>（如：球类/骑行/散步）
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <strong>3. 作业习惯</strong><br>
            日均时长：⏰ [<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->shenghuo, 'rijunshichang', '') }}</span>]小时<br>
            单次连续时长：⏰ [<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->shenghuo, 'dancilianxu', '') }}</span>]分钟<br>
            休息方式：
            {!! \Dcat\Admin\Widgets\Checkbox::make('xiuxifangshi', \App\Admin\Repositories\Config::selectOptions(pid: 492)->all())->inline()->check(\Illuminate\Support\Arr::get($model->shenghuo, 'xiuxifangshi', [])) !!}
            <label> 其他<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->shenghuo, 'xiuxifangshi_other', '') }}</span></label><br>
            辅助工具：
            {!! \Dcat\Admin\Widgets\Checkbox::make('fuzhugongju', \App\Admin\Repositories\Config::selectOptions(pid: 497)->all())->inline()->check(\Illuminate\Support\Arr::get($model->shenghuo, 'fuzhugongju', [])) !!}
            <br>
            陪同者：
            {!! \Dcat\Admin\Widgets\Checkbox::make('peitong', \App\Admin\Repositories\Config::selectOptions(pid: 501)->all())->inline()->check(\Illuminate\Support\Arr::get($model->shenghuo, 'peitong', [])) !!}
            <br>
            照明：
            {!! \Dcat\Admin\Widgets\Checkbox::make('zhaoming', \App\Admin\Repositories\Config::selectOptions(pid: 504)->all())->inline()->check(\Illuminate\Support\Arr::get($model->shenghuo, 'zhaoming', [])) !!}
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <strong>4. 电子设备使用</strong><br>
            <table class="table table-sm">
                <tr>
                    <th>设备</th>
                    <th>时长</th>
                    <th>内容</th>
                    <th>姿势</th>
                    <th>距离</th>
                    <th>休息间隔</th>
                </tr>
                <tr>
                    <td><label>电视</label></td>
                    <td>[<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->dianzi, 'dianshi', '') }}</span>]分钟</td>
                    <td><span class="hengxian">{{ \Illuminate\Support\Arr::get($model->dianzi, 'dianshi_neirong', '') }}</span></td>
                    <td>
                        {!! \Dcat\Admin\Widgets\Checkbox::make('dianshi_zishi', \App\Admin\Repositories\Config::selectOptions(pid: 508)->all())->inline()->check(\Illuminate\Support\Arr::get($model->dianzi, 'dianshi_zishi', [])) !!}
                    </td>
                    <td>[<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->dianzi, 'dianshi_mi', '') }}</span>]米</td>
                    <td>[<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->dianzi, 'dianshi_xiuxi', '') }}</span>]分钟/休息次</td>
                </tr>
                <tr>
                    <td><label>手机/PAD</label></td>
                    <td>[<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->dianzi, 'shouji', '') }}</span>]分钟</td>
                    <td><span class="hengxian">{{ \Illuminate\Support\Arr::get($model->dianzi, 'shouji_neirong', '') }}</span></td>
                    <td>
                        {!! \Dcat\Admin\Widgets\Checkbox::make('shouji_zishi', \App\Admin\Repositories\Config::selectOptions(pid: 508)->all())->inline()->check(\Illuminate\Support\Arr::get($model->dianzi, 'shouji_zishi', [])) !!}
                    </td>
                    <td>[<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->dianzi, 'shouji_mi', '') }}</span>]米</td>
                    <td>[<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->dianzi, 'shouji_xiuxi', '') }}</span>]分钟/休息次</td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td colspan="5">
            <strong>5. 课外班情况</strong><br>
            类型：
            {!! \Dcat\Admin\Widgets\Checkbox::make('fudao_leixing', \App\Admin\Repositories\Config::selectOptions(pid: 512)->all())->inline()->check($model->fudao_leixing) !!}
            <br>
            <table width="100%">
              <tr><th>周几</th><th>几点</th><th>时间</th></tr>
              @if($model->fudao_kewai)
              @foreach($model->fudao_kewai as $row)
              <tr>
                <td>{{ $row['zhouji'] }}</td>
                <td>{{ $row['shangke'] }}</td>
                <td>{{ $row['shijian'] }}</td>
              </tr>
              @endforeach
              @endif
            </table>
        </td>
    </tr>

    <!-- 三、现有护眼措施 -->
    <tr>
        <th colspan="2">三、现有护眼措施（可多选）</th>
    </tr>
    <tr>
        <td colspan="2">
            {!! \Dcat\Admin\Widgets\Checkbox::make('huyan', \App\Admin\Repositories\Config::selectOptions(pid: 515)->all())->inline()->check(\Illuminate\Support\Arr::get($model->huyan, 'huyan1', [])) !!}
            <label>其他<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->huyan, 'other', '') }}</span></label><br>
        </td>
    </tr>

    <!-- 四、视力问题诊断 -->
    <tr>
        <th colspan="2">四、视力问题诊断</th>
    </tr>
    <tr>
        <td colspan="2">
            <strong>1. 初步分类</strong><br>
            {!! \Dcat\Admin\Widgets\Checkbox::make('zhenduan', \App\Admin\Repositories\Config::selectOptions(pid: 425)->all())->inline()->check(\Illuminate\Support\Arr::get($model->zhenduan, 'zhenduan1', [])) !!}
            <label>其他<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->zhenduan, 'other', '') }}</span></label><br>
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <strong>2. 斜视类型（如存在）</strong><br>
            {!! \Dcat\Admin\Widgets\Checkbox::make('xieshi', \App\Admin\Repositories\Config::selectOptions(pid: 433)->all())->inline()->check(\Illuminate\Support\Arr::get($model->zhenduan, 'xieshi', [])) !!}
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <strong>3. 调节功能异常（如存在）</strong><br>
            {!! \Dcat\Admin\Widgets\Checkbox::make('xieshi', \App\Admin\Repositories\Config::selectOptions(pid: 477)->all())->inline()->check(\Illuminate\Support\Arr::get($model->zhenduan, 'tiaojie', [])) !!}

        </td>
    </tr>

    <!-- 五、家长核心诉求 -->
    <tr>
        <th colspan="2">五、家长核心诉求</th>
    </tr>
    <tr>
        <td colspan="2">
            最关心的问题：<br>
            {!! \Dcat\Admin\Widgets\Checkbox::make('jiazhang', \App\Admin\Repositories\Config::selectOptions(pid: 527)->all())->inline()->check(\Illuminate\Support\Arr::get($model->jiazhang, 'hexin', [])) !!}
            <label>其他<span class="hengxian">{{ \Illuminate\Support\Arr::get($model->jiazhang, 'other', '') }}</span></label><br>
        </td>
    </tr>
</table>

<style>
  .hengxian{  text-align: center; line-height: 40px; border-bottom: 1px solid #000; padding:0 20px;}
</style>
